/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.andersen.web.service;

import com.andersen.database.dao.BuyingDao;
import com.andersen.database.entity.BuyingEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Corvin
 */
@Service
public class BuyingService {
    
    @Autowired 
    private BuyingDao dao;
    
    public BuyingEntity getBuyingById(long id) {
        return dao.getById(id);
    }
    
    public long insertBuying(BuyingEntity buying) {
        return dao.insert(buying);
    }
    
    public boolean updateBuying(BuyingEntity buying) {
        return dao.update(buying);
    }
    
}
